home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
049b.dms
/
049b.adf
/
MORE_SOURCE_CODE
/
AJC-DEMOLITION.AMOS
/
AJC-DEMOLITION.amosSourceCode
next >
Wrap
AMOS Source Code
|
1992-02-26
|
4KB
|
179 lines
'
' "Demolition"
'
' A nice little game for all to share by Andrew Campbell
'
' Originally included in the game BRAINSHAVE as an extra.
' Get in touch with the Assassin's for more details!
'
' Cheers - AJC
'
Global X,Y,X1,Y1,C,LVL,COUNT,SHOT,SFX
Default Palette 0,$FFF,$F00,$F0,$F,$F0F,$FF0,$0,$0,$777,$666,$555,$444,$333,$222,$0
Screen Open 0,320,200,2,Lowres : Curs Off : Flash Off : Cls 0
SFX=1
'
MAKEUP
'
Auto View Off
Screen Open 2,320,200,8,Lowres : Curs Off : Flash Off : Cls 0 : Hide On
Screen Open 0,320,400,8,Lowres : Curs Off : Flash Off : Cls 0 : Hide On
Colour 17,$FFF : Screen Display 0,,,,200
'
Dual Playfield 0,2
'
LVL=1
'
Screen 2
For I=1 To 250 : Circle Rnd(319),Rnd(199),Rnd(9)+1 : Next I
Def Scroll 2,0,0 To 320,200,0,1
Screen 0
Def Scroll 1,0,0 To 320,400,0,-10
Auto View On : View
X=X Hard(150) : Y=Y Hard(7)
Sprite 0,X,Y,1 : Wait Vbl
'
Auto View On : View
RESTART:
SHOT=0
COUNT=0
MAKEWALL
Timer=0
MAIN:
Screen 2 : Scroll 2 : Screen Copy 2,0,198,320,199 To 2,0,0
Screen 0
If Jleft(1) : X=X-3 : LIMITS : Sprite 0,X,Y,1 : End If
If Jright(1) : X=X+3 : LIMITS : Sprite 0,X,Y,1 : End If
If Fire(1) and Chanmv(4)=0 : If SFX=1 : Sam Play %1110,1 : End If : SHER : End If
If Timer>100-(LVL*10)
Scroll 1 : CHECK_TOP : Timer=0
If SFX=1 : Sam Play %1,3 : End If
End If
If Chanmv(4)=-1
X1=X Screen(X Sprite(4)) : Y1=Y Screen(Y Sprite(4))
C=Point(X1,Y1)
If C>0 and C<8
Sprite Off(4)
WIPE_BLOCK
End If
End If
If SHOT=COUNT : If SFX=1 : Sam Play %1111,2 : End If : Inc LVL : Goto RESTART : End If
Goto MAIN
'
Procedure MAKEUP
Auto View Off
Screen Open 1,320,50,16,Lowres : Curs Off : Flash Off : Cls 0 : Hide On
'------- Make Control Bob
Ink 1 : Polygon 0,0 To 14,0 To 7,7
Get Bob 1,1,0,0 To 16,16
Hot Spot 1,7,7
Cls 0
'------ Make Bullet Bob
Ink 1 : Plot 0,0,1
Get Bob 1,2,0,0 To 16,1
Cls 0
Screen Close 1
End Proc
Procedure LIMITS
If X>X Hard(319-7) : X=X Hard(319-7) : End If
If X<X Hard(7) : X=X Hard(7) : End If
End Proc
Procedure SHER
Sprite 4,X,Y,2
Amal 4,"M 0,200,20"
Amal On 4
End Proc
Procedure MAKEWALL
Screen 0
For I=0 To LVL*2
For J=0 To 19
Inc COUNT
Ink Rnd(4)+2
Bar J*16,200+(I*10) To(J*16)+16,200+(I*10)+10
Ink 7 : Box J*16+1,200+(I*10)+1 To(J*16)+16-1,200+(I*10)+10-1
Next J
Next I
End Proc
Procedure WIPE_BLOCK
Gosub WIPE
LEFT=1 : RIGHT=1
LX=X2*16 : LY=Y2*10 : RX=X2*16 : RY=Y2*10
LX=LX-8 : LY=LY+5 : RX=RX+24 : RY=RY+5
If Point(LX,LY)=0 : LEFT=1 : End If
If Point(RX,RY)=0 : RIGHT=1 : End If
LX=LX+16 : RX=RX-16
Repeat
If LEFT=1 : If Point(LX-16,LY)<8 and Point(LX-16,LY)>0 : LEFT=0 : End If : End If
If RIGHT=1 : If Point(RX+16,RY)<8 and Point(RX+16,RY)>0 : RIGHT=0 : End If : End If
If LEFT=1
LX=LX-16 : LY=LY+10
C=Point(LX,LY)
If C=0 or C>7 or C=-1 : LEFT=0 : Else Gosub WIPE2 : End If
End If
If RIGHT=1
RX=RX+16 : RY=RY+10
C=Point(RX,RY)
If C=0 or C>7 or C=-1 : RIGHT=0 : Else Gosub WIPE3 : End If
End If
Until LEFT=0 and RIGHT=0
Pop Proc
WIPE:
X2=X1/16 : Y2=Y1/10 : Ink 0 : Bar X2*16,Y2*10 To X2*16+15,Y2*10+10 : Inc SHOT
If SFX=1 : Sam Play %1000,4 : End If
Return
WIPE2:
X2=LX/16 : Y2=LY/10 : Ink 0 : Bar X2*16,Y2*10 To X2*16+15,Y2*10+10 : Inc SHOT
If SFX=1 : Sam Play %100,4 : End If
Return
WIPE3:
X2=RX/16 : Y2=RY/10 : Ink 0 : Bar X2*16,Y2*10 To X2*16+15,Y2*10+10 : Inc SHOT
If SFX=1 : Sam Play %10,4 : End If
Return
End Proc
Procedure CHECK_TOP
For I=2 To 319 Step 16
C=Point(I,5)
If C>0 and C<8
Paper 0 : Pen 1
Locate 0,12 : Centre "G A M E O V E R"
Wait 150
Edit
End If
Next I
End Proc